#ifndef __STORMWIDGET_CONFIGMANAGE_CMD5CHECK_MD5CHECK_H
#define __STORMWIDGET_CONFIGMANAGE_CMD5CHECK_MD5CHECK_H


typedef struct tagMD5_CTX
{
	ULONG count[2];					/* number of bits, modulo 2^64 (lsb first) */
	ULONG buf[4];                   /* state (ABCD) */
	unsigned char in[64];           /* input buffer */
	unsigned char digest[16];       /* actual digest after MD5Final call */
}MD5_CTX;
typedef void (WINAPI* PMD5Init)(MD5_CTX *);
typedef void (WINAPI* PMD5Update)(MD5_CTX *, const unsigned char *, unsigned int);
typedef void (WINAPI* PMD5Final )(MD5_CTX *);
static PMD5Init MD5Init = 0;
static PMD5Update MD5Update = 0;
static PMD5Final MD5Final = 0;

class CMD5Check
{
public:
	CMD5Check(void);
	~CMD5Check(void);

	BOOL CheckMD5(LPCTSTR lpFile,DWORD dwPos,DWORD dwSpLen,LPCTSTR lpDM5Str);
	BOOL InputFile(LPCTSTR lpFile,DWORD dwPos,DWORD dwSplen,LPTSTR lpOutStr);
	BOOL InputFileHandle(HANDLE hFile,DWORD dwPos,DWORD dwSplen,LPTSTR lpOutStr);
	void InputBuffer(LPBYTE lpBuffer,ULONG len,LPTSTR lpOutBuf);
};

#endif //__STORMWIDGET_CONFIGMANAGE_CMD5CHECK_MD5CHECK_H
